package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Permission;

import java.util.List;
import java.util.Set;

public interface PermissionDao {
    /**
     * 根据角色的id查询此角色包含的所有权限信息
     * @param roleId
     * @return
     */
    Set<Permission> findByRoleId(Integer roleId);

    Page<Permission> findAll(String queryString);

    void saveOne(Permission permission);

    Permission selectById(int id);

    void updateOne(Permission permission);

    void deleteById(int id);

    Long selectMiddleByPermissionId(int id);

    List<Permission> findAllNoPagination();

}
